<h1>Liste des utilisateurs du service</h1>

<table>
  <tr>
    <th>id</th>
    <th>firstname</th>
    <th>lastname</th>
  </tr>

<% @users.each do |user| %>
  <tr>
    <td><%=h user.id %>
    <td><%=h user.firstname.capitalize if user.firstname %>
    <td><%=h user.lastname.capitalize if user.lastname %></td>
    <td><%= link_to 'Show', :controller => "admin/users", :action => :show , :id => user.id %></td>
    <td><%= link_to 'Edit', :controller => "admin/users", :action => :edit, :id => user.id %></td>
    <td><%= link_to 'Destroy',{:controller => "admin/users", :action => :destroy, :id => user}, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New user', :controller => "admin/users", :action => "new" %>